package com.gusha.model;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @Created：2018-10-30 14:25:23
 * @Author LightSound的代码生成器
 * @Description:InfoContent实体类
 */
@Entity
@Table(name="info_content")
@NamedQuery(name="InfoContent.findAll", query="SELECT i FROM InfoContent i")
@DynamicInsert
@Data
@NoArgsConstructor
@AllArgsConstructor
public class InfoContent implements Serializable {

    private static final long serialVersionUID = 1L;
    
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)    
    private BigInteger id;
    
    //分类ID
    @Column(name="classify_id")
    private BigInteger classifyId;
    
    //资讯标题
    @Column(name="info_title")
    private String infoTitle;
    
    //资讯封面图
    @Column(name="info_icon")
    private String infoIcon;
    
    //资讯简介
    @Column(name="info_remark")
    private String infoRemark;
    
    //资讯描述
    @Column(name="info_desc")
    private String infoDesc;
    
    //资讯内容
    @Column(name="info_contents")
    private String infoContents;
    
    //资讯关键字
    @Column(name="info_key")
    private String infoKey;
    
    //资讯作者
    @Column(name="info_author")
    private String infoAuthor;
    
    //资讯来源
    @Column(name="info_source")
    private String infoSource;
    
    //点击次数
    @Column(name="click_num")
    private Long clickNum;
    
    //0未删 1已删
    @Column(name="is_delete")
    private Integer isDelete;
    
    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="create_time")
    private Date createTime;
    
    //更新时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="update_time")
    private Date updateTime;
    
    //创建人
    @Column(name="creator")
    private String creator;
    
    //更新人
    @Column(name="updator")
    private String updator;
    
	@ManyToOne(fetch=FetchType.LAZY)
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name="user_id")
    private User userId;

	public User getUserId() {
		return userId;
	}

	public void setUserId(User userId) {
		this.userId = userId;
	}

	public BigInteger getId() {
		return id;
	}

	public void setId(BigInteger id) {
		this.id = id;
	}

	public BigInteger getClassifyId() {
		return classifyId;
	}

	public void setClassifyId(BigInteger classifyId) {
		this.classifyId = classifyId;
	}

	public String getInfoTitle() {
		return infoTitle;
	}

	public void setInfoTitle(String infoTitle) {
		this.infoTitle = infoTitle;
	}

	public String getInfoIcon() {
		return infoIcon;
	}

	public void setInfoIcon(String infoIcon) {
		this.infoIcon = infoIcon;
	}

	public String getInfoRemark() {
		return infoRemark;
	}

	public void setInfoRemark(String infoRemark) {
		this.infoRemark = infoRemark;
	}

	public String getInfoDesc() {
		return infoDesc;
	}

	public void setInfoDesc(String infoDesc) {
		this.infoDesc = infoDesc;
	}

	public String getInfoContents() {
		return infoContents;
	}

	public void setInfoContents(String infoContents) {
		this.infoContents = infoContents;
	}

	public String getInfoKey() {
		return infoKey;
	}

	public void setInfoKey(String infoKey) {
		this.infoKey = infoKey;
	}

	public String getInfoAuthor() {
		return infoAuthor;
	}

	public void setInfoAuthor(String infoAuthor) {
		this.infoAuthor = infoAuthor;
	}

	public String getInfoSource() {
		return infoSource;
	}

	public void setInfoSource(String infoSource) {
		this.infoSource = infoSource;
	}

	public Long getClickNum() {
		return clickNum;
	}

	public void setClickNum(Long clickNum) {
		this.clickNum = clickNum;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getUpdator() {
		return updator;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
    
    

}
